package com.mb.common.utils;

import com.mb.app.domain.TbProductColor;
import com.mb.app.domain.TbProductSpecs;

import java.util.ArrayList;
import java.util.List;

public class MethodServiceUtils {

    public boolean colorContains(String id,List<TbProductColor> proofs){
        System.out.println(proofs);
        List<Long> ids = new ArrayList<>();
        for(TbProductColor p: proofs){
            ids.add(p.getColorId());
        }
        return (ids.contains(id));
    }

    public boolean specsContains(String id,List<TbProductSpecs> proofs){
        System.out.println(proofs);
        List<Long> ids = new ArrayList<>();
        for(TbProductSpecs p: proofs){
            ids.add(p.getSpecsId());
        }
        return (ids.contains(id));
    }
}
